<?php
namespace api\modules\v1\controllers;

use api\controllers\AuthController;
use common\services\user\UserResourceService;

/**
 * 用户接口控制器
 * Class UserController
 * @package api\modules\v1\controllers
 */
class UserController extends AuthController
{
    /**
     * @return mixed
     */
    public function actionGetMe()
    {

        return \Yii::$app->api->success(\Yii::$app->user->getIdentity());
    }

    /**
     * @return mixed
     */
    public function actionIndex()
    {
        return \Yii::$app->api->success(UserResourceService::getAll());
    }
}